﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ContentConfig" elementFormDefault="qualified" xmlns="Content.xsd" attributeFormDefault="unqualified" xmlns:mstns="config.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="config.xsd">
  <xs:element name="ContentConfig">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="DataSources" type="mstns:WinKStartDataSources" minOccurs="1" maxOccurs="1" />
        <xs:element name="SearchEngines" type="mstns:WinKStartSearchEngines" minOccurs="1" maxOccurs="1" />
        <xs:element name="ContextMenu" type="mstns:WinKStartContextMenuTarget" minOccurs="1" maxOccurs="1" />
        <xs:element name="Actions" type="mstns:WinKStartActions" minOccurs="1" maxOccurs="1" />
        <xs:element name="Functions" type="mstns:WinKStartFunctions" minOccurs="1" maxOccurs="1" />
        <xs:element name="Regions" type="mstns:Regions" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="WinKStartDataSources">
    <xs:sequence>
      <xs:element name="AddDataSource" type="mstns:DataSourceItem" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DataItemItems">
    <xs:sequence>
      <xs:element name="AddDataItem" type="mstns:MenuItem" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DataSourceItem">
    <xs:sequence>
      <xs:element name="CustomItems" type="mstns:DataItemItems" minOccurs="0" maxOccurs="1" />
      <xs:element name="Assignments" type="mstns:KeyValueAssignments" minOccurs="0" maxOccurs="1" />
      <xs:element name="Options" type="mstns:KeyValueOptions" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="Assembly" type="xs:string" />
    <xs:attribute name="ClassName" type="xs:string" />
    <xs:attribute name="ShortName" type="xs:string" />
    <xs:attribute name="Searchable" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="WinKStartSearchEngines">
    <xs:sequence>
      <xs:element name="AddSearchEngine" type="mstns:SearchEngineItem" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="SearchEngineItem">
    <xs:sequence>
      <xs:element name="Options" type="mstns:KeyValueOptions" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="ShortName" type="xs:string" />
    <xs:attribute name="Assembly" type="xs:string" />
    <xs:attribute name="ClassName" type="xs:string" />
    <xs:attribute name="DataSource" type="xs:string" />
    <xs:attribute name="Filter" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="WinKStartFunctions">
    <xs:sequence>
      <xs:element name="AddFunction" type="mstns:WinKStartFunction" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="WinKStartUsedIn">
    <xs:sequence>
      <xs:element name="AddParent" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>  
  <xs:complexType name="WinKStartContextMenuItem">
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="Caption" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="WinKStartContextMenuTargetItem">
    <xs:sequence>
      <xs:element name="UsedIn" type="mstns:WinKStartUsedIn" minOccurs="1" maxOccurs="1" />
      <xs:element name="CustomItems" type="mstns:WinKStartContextMenu" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="Type" type="mstns:ContextMenuTarget" />
  </xs:complexType>
  <xs:complexType name="WinKStartContextMenuTarget">
    <xs:sequence>
      <xs:element name="AddTarget" type="mstns:WinKStartContextMenuTargetItem" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="WinKStartContextMenu">
    <xs:sequence>
      <xs:element name="AddItem" type="mstns:WinKStartContextMenuItem" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="WinKStartSingleTrigger">
    <xs:attribute name="Event" type="mstns:WinKStartTriggerEvent" use="required" />
    <xs:attribute name="Value" type="xs:string" use="optional" />
    <xs:attribute name="DataLength" type="xs:integer" use="optional" />
  </xs:complexType>
  <xs:complexType name="WinKStartTrigger">
    <xs:sequence>
      <xs:element name="AddTrigger" type="mstns:WinKStartSingleTrigger" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="WinKStartSourceElement">
    <xs:attribute name="Element" type="xs:string" />
    <xs:attribute name="Property" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="WinKStartSourceElements">
    <xs:sequence>
      <xs:element name="AddSource" type="mstns:WinKStartSourceElement" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="WinKStartAction">
    <xs:sequence>
      <xs:element name="Trigger" type="mstns:WinKStartTrigger" minOccurs="1" maxOccurs="1" />
      <xs:element name="SourceElements" type="mstns:WinKStartSourceElements" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" use="required" />
    <xs:attribute name="Type" type="mstns:WinKStartEventSourceType" use="required" />    
    <xs:attribute name="EventSourceElement" type="xs:string" use="required"/>
    <xs:attribute name="Function" type="xs:string" use="required" />
  </xs:complexType>
  <xs:complexType name="WinKStartActions">
    <xs:sequence>
      <xs:element name="AddAction" type="mstns:WinKStartAction" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="WinKStartFunction">
    <xs:sequence>
      <xs:element name="Options" type="mstns:KeyValueOptions" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" use="required" />
    <xs:attribute name="Assembly" type="xs:string" use="required" />
    <xs:attribute name="ClassName" type="xs:string" use="required" />
    <xs:attribute name="DataSource" type="xs:string" use="required" />
    <xs:attribute name="Filter" type="xs:string" use="optional" />
  </xs:complexType>
  <xs:complexType name="MenuConfig">
    <xs:sequence>
      <xs:element name="MenuItem" type="mstns:MenuItem" minOccurs="1" maxOccurs="unbounded"></xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="MenuItem">
    <xs:sequence>
      <xs:element name="Items" type="mstns:DataItemItems" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="ViewName" type="xs:string"/>
    <xs:attribute name="Name" type="xs:string"/>
    <xs:attribute name="LinkExecutionType" type="mstns:LinkExecutionTypes"/>
    <xs:attribute name="Executable" type="xs:string"/>
    <xs:attribute name="ExecutionProcedure" type="mstns:ExecutionCodeProcedure"/>
    <xs:attribute name="WorkingDir" type="xs:string"/>
    <xs:attribute name="Arguments" type="xs:string"/>
    <xs:attribute name="Image" type="xs:string"/>
    <xs:attribute name="Type" type="mstns:MenuItemTypes" />
    <xs:attribute name="Filter" type="xs:string" />
    <xs:attribute name="Comment" type="xs:string" />
    <xs:attribute name="PanelID" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="Region">
    <xs:sequence>            
      <xs:element name="Panels" type="mstns:MinimizeablePanels" minOccurs="0" maxOccurs="1" />			
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" />
    <xs:attribute name="Caption" type="xs:string" />
    <xs:attribute name="ShowContextmenu" type="xs:boolean" default="true" />
    <xs:attribute name="CanAddToFavorite" type="xs:boolean" default="false" />
    <xs:attribute name="CanRemoveFromFavorite" type="xs:boolean" default="false" />
    <xs:attribute name="RenderMethode" type="mstns:RenderType" />
    <xs:attribute name="DataSource" type="xs:string" />
    <xs:attribute name="Filter" type="xs:string" />
    <xs:attribute name="CanNavigate" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="Regions">
    <xs:sequence>
      <xs:element name="AddRegion" type="mstns:Region" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="FileExtensionToFilterItem">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Extension" type="xs:string" />
        <xs:attribute name="Filter" type="xs:string" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="KeyValueAssignment">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="Key" type="xs:string" />
        <xs:attribute name="Value" type="xs:string" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="KeyValueOptions">
    <xs:sequence>
      <xs:element name="AddOption" type="mstns:KeyValueAssignment" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="KeyValueAssignments">
    <xs:sequence>
      <xs:element name="AddAssignment" type="mstns:KeyValueAssignment" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="MinimizeablePanel">    
    <xs:attribute name="Caption" type="xs:string" />
    <xs:attribute name="MaxViewedElements" type="xs:integer" default="5" />
    <xs:attribute name="PanelID" type="xs:string" />
    <xs:attribute name="CanCollpseExpand" type="xs:boolean" default="true" />
    <xs:attribute name="DefaultOpenedStyle" type="mstns:PanelOpenedStyle" default="Collapsed" />
    <xs:attribute name="CloseIfOpenOtherPanel" type="xs:boolean" default="true" />
    <xs:attribute name="Type" type="mstns:ContentPanelContentType" />
    <xs:attribute name="ItemType" type="mstns:MenuItemTypes" />
    <xs:attribute name="DataSource" type="xs:string" />
    <xs:attribute name="Filter" type="xs:string" />
    <xs:attribute name="CanNavigate" type="xs:boolean" />
    <xs:attribute name="SortItems" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="MinimizeablePanels">
    <xs:sequence>
      <xs:element name="AddPanel" type="mstns:MinimizeablePanel" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="FileExtensionsToFilter">
    <xs:sequence>
      <xs:element name="AddFileExt" type="mstns:FileExtensionToFilterItem" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="WinKStartTriggerEvent">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Click" />
      <xs:enumeration value="MouseDown" />
      <xs:enumeration value="MouseMove" />
      <xs:enumeration value="MouseUp" />
      <xs:enumeration value="KeyDown" />
      <xs:enumeration value="KeyUp" />
      <xs:enumeration value="MouseEnter" />
      <xs:enumeration value="MouseLeave" />
      <xs:enumeration value="GotFocus" />
      <xs:enumeration value="LeaveFocus" />
      <xs:enumeration value="TextChanged" />
      <xs:enumeration value="SelectionChanged" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="WinKStartEventSourceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ContextMenu" />
      <xs:enumeration value="Control" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ContentPanelContentType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Favorites" />
      <xs:enumeration value="FavoriteDocuments" />
      <xs:enumeration value="Programs" />
      <xs:enumeration value="RecentOpenedDocuments" />
      <xs:enumeration value="System"  />
      <xs:enumeration value="Systemmenu"  />
      <xs:enumeration value="SearchResult"  />
      </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="MenuItemTypes">
    <xs:restriction base="xs:string">      
      <xs:enumeration value="Folder" />      
      <xs:enumeration value="Label" />
      <xs:enumeration value="Link" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="LinkExecutionTypes">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Program" />
      <xs:enumeration value="Code" />      
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ExecutionCodeProcedure">
    <xs:restriction base="xs:string">
      <xs:enumeration value="lock_workstation" />
      <xs:enumeration value="system_logout" />
      <xs:enumeration value="energy_save_mode" />
      <xs:enumeration value="hibernate_mode" />
      <xs:enumeration value="winkstart_settings" />
      <xs:enumeration value="winkstart_close" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PanelOpenedStyle">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Expanded" />
      <xs:enumeration value="Collapsed" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="RenderType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Simple" />
      <xs:enumeration value="Groups" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ContextMenuTarget">
    <xs:restriction base="xs:string">
      <xs:enumeration value="SelectedItem" />
      <xs:enumeration value="Custom" />
    </xs:restriction>
  </xs:simpleType>  
</xs:schema>
